/**
 * 注册登陆接口
 * 
 * @author 杨斌
 * @since 2019-05-19
 */
import common from './common'
import store from './store'

var ApiList = {};

//API 接口

/**
 * 注册
 */
ApiList.register = function (mobile, code, invite_code, okCb, failCb) {
  var p = {
    mobile,
    code
  }
  if (invite_code) p['invite_code'] = invite_code;
  common.Api('/passport/register', p, okCb, failCb)
}

/**
 * 登陆
 */
ApiList.login = function (mobile, code, okCb, failCb) {
  var p = {
    mobile,
    code
  }
  common.Api('/passport/login', p, okCb, failCb)
}

/**
 * 短信验证码
 */
ApiList.getSmsCode = function (mobile, okCb, failCb) {
  var p = {
    mobile,
    
  }
  common.Api('/passport/send_phone_code', p, okCb, failCb)
}



export default ApiList;
